<!DOCTYPE HTML>
<html>
<head>
<meta http-equiv="Content-Type" content="text/html; charset=utf-8">
<title>无标题文档</title>
<script src="jquery-2.0.3.js"></script>
<script>

$(function(){
	
	//$('div').add('span').css('border','1px red solid');
	
	//addBack()
	//end()
	
	//$('div').find('span').css('color','red').addBack('.box').css('border','1px red solid');
	
	//$('span').parent().css('border','1px red solid');
	
	//$('span').parents('body').css('border','1px red solid');
	
	//$('span').parentsUntil('body','div').css('border','1px red solid');
	
	//$('span').parent().css('border','1px red solid');
	
	$('span').next().css('border','1px red solid');

	
});

</script>
</head>

<body>
<!--<div>div<span>span</span></div>
<div class="box">div<span>span</span></div>
<div>div<span>span</span></div>
<div>div<span>span</span></div>-->

<!--<div>div<p>p<span>span</span></p></div>
<p>p<span>span</span></p>
-->
<div>
<span>span</span>
ssssss
<p>p</p>
</div>
</body>
</html>
